<template>
  <div class="logout">
    <top-btn-one @click="logout">退出</top-btn-one>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import TopBtnOne from "./TopBtnOne.vue";

@Component({
  name: "Logout",
  components: {
    TopBtnOne
  }
})
export default class Logout extends Vue {
  logout() {
    this.$dialog
      .confirm({
        message: "是否要退出本系统"
      })
      .then(() => {
        this.$router.push({ name: "Login" });
      })
      .catch(() => {
        // undo
      });
  }
}
</script>

<style lang="less" scoped>
.logout {
  // font-size: 14px;
}
</style>
